﻿@page "{departmentId:int}"
@model AspCoreRazorDemo.Pages.Employee.AddEmployeeModel
@using AspCoreRazorDemo.Models

<form method="post">
    <div class="row form-group">
        <div class="col-md-2 offset-md-2">
            <label asp-for="Employee.FristName"></label>
        </div>
        <div class="col-md-6">
            <input class="form-control" asp-for="Employee.FristName" />
        </div>
    </div>
    <div class="row form-group">
        <div class="col-md-2 offset-md-2">
            <label asp-for="Employee.LastName"></label>
        </div>
        <div class="col-md-6">
            <input class="form-control" asp-for="Employee.LastName" />
        </div>
    </div>
    <div class="row form-group">
        <div class="col-md-2 offset-md-2">
            <label asp-for="Employee.Gender"></label>
        </div>
        <div class="col-md-6">
            <select class="form-control"
                    asp-for="Employee.Gender"
                    asp-items="Html.GetEnumSelectList<Gender>()"></select>
        </div>
    </div>
    <div class="row">
        <div class="col-md-2 offset-md-2">
            <button type="submit" class="btn btn-primary">Add</button>
        </div>
    </div>
</form>
<div>
    <a asp-page="EmployeeList"  asp-route-departmentId="@RouteData.Values["departmentId"]">Back to List</a>
</div>
